import TabsView from '@/layouts/tabs/TabsView'

// 路由配置
const options = {
  routes: [
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
    {
      path: '/',
      name: '首页',
      component: TabsView,
      redirect: '/index',
      children: [
        {
          path: '/index',
          name: '首页',
          meta: {
          },
          component: () => import('@/pages/index/IndexPage')
        },
        {
          path: '/good/add',
          name: '发布商品',
          meta: {
            invisible: true, // 不在菜单上显示
            requireAuth: true // 是否需要登录
          },
          component: () => import('@/pages/goods/AddGood')
        },
        {
          path: '/good/edit/:id',
          name: '编辑商品',
          meta: {
            invisible: true, // 不在菜单上显示
            requireAuth: true // 是否需要登录
          },
          component: () => import('@/pages/goods/EditGood')
        },
        {
          path: '/my/space',
          name: '个人中心',
          meta: {
            invisible: true, // 不在菜单上显示
            requireAuth: true // 是否需要登录
          },
          component: () => import('@/pages/user/MySpace')
        },
        {
          path: '/my/edit',
          name: '编辑信息',
          meta: {
            invisible: true, // 不在菜单上显示
            requireAuth: true // 是否需要登录
          },
          component: () => import('@/pages/user/EditMyInfoPage')
        },
      ]
    },
  ]
}

export default options
